package com.it.d6_generics;

public class Test2 {
    public static void main(String[] args) {
        // 目标：掌握泛型类的定义和使用
        MyArrayList<String> list = new MyArrayList<>();
        list.add("java1");
        list.add("java2");
        String ele = list.get(1);
        System.out.println(ele);

//        MyClass2<String,String> c2 = new MyClass2<>();

        MyClass2<Cat1,String> c2 = new MyClass2<>();

        MyClass3<Animal> c3 = new MyClass3<>();

        MyClass3<Dog> c4 = new MyClass3<>();

    }
}
